import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
	store,
	...App
})
app.$mount()
// #endif

import req from 'requst.js'
Vue.prototype.$req = req
import share from './shareMixin/shareMixin.js'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
Vue.mixin(share)

import store from './store/index.js'
Vue.prototype.$store = store

Vue.prototype.$onLaunched = new Promise(resolve => {
	Vue.prototype.$isResolve = resolve;
})



Vue.prototype.$toLog = function() {
	uni.navigateTo({
		// url: '/pages/log/log'
		url: '/pages/editinfo/editinfo'
	})
}

Vue.prototype.$isEditInfo = function() {
	if (uni.getStorageSync('uid') == 0) {
		uni.navigateTo({
			url: '/pages/editinfo/editinfo'
		})
		return false
	} else {
		return true
	}
}

// #ifdef VUE3

import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App).use(store);
	return {
		app
	}
}
// #endif